package com.angle3d.samples;

import java.io.IOException;
import java.io.InputStream;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

class SampleUtil {

	public static Bitmap loadBitmap(int resourceId, Context context) {
		InputStream is = context.getResources().openRawResource(resourceId);
		Bitmap bitmap = null;
		try {
			bitmap = BitmapFactory.decodeStream(is);
		} finally {
			try {
				is.close();
				is = null;
			} catch (IOException e) {
			}
		}
		return bitmap;
	}
}

